<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>window.HELP_IMPROVE_VIDEOJS = false;</script>
	<link href="video-js.min.css" rel="stylesheet">
<script src="video.min.js"></script>
<script src="videojs-flash.min.js"></script>
<style type="text/css">

	.vjs-playback-rate .vjs-playback-rate-value{
		font-size: 1em;
	    line-height: 3em;
	}
	.vjs-resolution-button .vjs-icon-placeholder:before {
  content: '标清';
  font-weight: normal;
  font-style: normal;
  font-size: 1em;
  line-height: 3em;
}

.vjs-resolution-button .vjs-resolution-button-label {
  font-size: 1em;
  line-height: 3em;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  box-sizing: inherit;
}

.vjs-resolution-button .vjs-menu .vjs-menu-content {
  width: 4em;
  left: 50%; /* Center the menu, in it's parent */
  margin-left: -2em; /* half of width, to center */
}

.vjs-resolution-button .vjs-menu li {
  text-transform: none;
  font-size: 1em;
}
.playerContainer{
  width: 640px;
  height: 360px;
}
.vjs-progress-holder.vjs-slider.vjs-slider-horizontal{
  display: none;
}
.vjs-remaining-time.vjs-time-control.vjs-control{
  display: none;
}
.vjs-tech {
  pointer-events: none;
}
.vjs-poster{
  background-size: cover
}
</style>
</head>
<body>
<div class="playerContainer">
  <video
    id="my-player"
    class="video-js  vjs-big-play-centered"
    controls
    preload="auto"
    poster="oceans.png"
    style="width:100%;height:100%">
</video>
</div>
</body>
<script type="text/javascript">
  videojs.options.flash.swf = 'video-js.swf';
	var player = videojs('my-player',{
    techOrder:  ['flash'],
    errorDisplay: false,
    sources:[
      {
        src:"rtmp://202.69.69.180:443/webcast/bshdlive-pc",
        type:"rtmp/mp4"
      }
    ]
	});
 
  player.on('ready', function() {
    this.getChild("ControlBar").removeChild("PlayToggle")
  })
  
  player.on('error', function() {
  console.log('The following error occurred:', this.error());
});



function flashChecker() {
    var hasFlash = 0; //是否安装了flash
    var flashVersion = 0; //flash版本
    if (document.all) {
      var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
      if (swf) {
        hasFlash = 1;
        VSwf = swf.GetVariable("$version");
        flashVersion = parseInt(VSwf.split(" ")[1].split(",")[0]);
      }
    } else {
      if (navigator.plugins && navigator.plugins.length > 0) {
        var swf = navigator.plugins["Shockwave Flash"];
        if (swf) {
          hasFlash = 1;
          var words = swf.description.split(" ");
          for (var i = 0; i < words.length; ++i) {
            if (isNaN(parseInt(words[i]))) continue;
            flashVersion = parseInt(words[i]);
          }
        }
      }
    }
    return { f: hasFlash, v: flashVersion };
  }
  var fls = flashChecker();
  console.log(fls)
</script>



</html>